﻿@using DLULearningNetwork.ViewModels;
@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/FrontEndMasterLayout.cshtml";
}

@section cssjs{
    <link href="@Url.Content("~/Content/base/jquery-ui-1.8.16.custom.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/FormStyle.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery-ui-1.8.16.custom.min.js")"></script>
    <script type="text/javascript">
        $(function () {
            $("button").button();
            var loadedFlag = new Array();
            loadedFlag["BasicInfo"] = 1;
            loadedFlag["ContactInfo"] = 0;
            loadedFlag["EducationInfo"] = 0;
            loadedFlag["OccupationInfo"] = 0;
            loadedFlag["AccomodationInfo"] = 0;
            loadedFlag["InterestInfo"] = 0;
            $("#accordion").accordion({
                autoHeight: false,
                changestart: function (event, ui) {
                    var infoTypeId = ui.newHeader.attr("id");
                    if (loadedFlag[infoTypeId] == 0) {
                        loadedFlag[infoTypeId] = 1;
                        $.get("/Profile/" + infoTypeId, function (data) {
                            ui.newContent.html(data);
                            $("button").button();
                        })
                    }
                }
            });
        });
    </script>
}
@section rightColumn{
    <div id="accordion" style="width:730px;">
        <h3 id="BasicInfo">
            <a href="#">Thông tin cơ bản </a>
        </h3>
        <div id="basicInfoContainer">
            @Html.Action("BasicInfo")
        </div>
        <h3 id="ContactInfo">
            <a href="#">Thông tin liên hệ </a>
        </h3>
        <div id="contactInfoContainer">
        </div>
        <h3 id="EducationInfo">
            <a href="#">Học hành </a>
        </h3>
        <div id="educationInfoContainer">
        </div>
        <h3 id="OccupationInfo">
            <a href="#">Nghề nghiệp </a>
        </h3>
        <div id="occupationContainer">
        </div>
        <h3 id="AccomodationInfo">
            <a href="#">Nơi ở </a>
        </h3>
        <div id="accomodationContainer">
        </div>
        <h3 id="InterestInfo">
            <a href="#">Sở thích </a>
        </h3>
        <div id="interestContainer">
        </div>
    </div>
}
